<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <!-- 想要的页面结构 -->
    <!-- 
      <div id="root">
        <div>
          <h1>Hello React</h1>
          <div class="box">
            <p>我的天，洗脚真爽。</p>
            <button class="btn">那确实</button>
          </div>
        </div>
      </div> 
    -->

    <div id="root"></div>

    <!-- <script src="./js/react.development.js"></script> -->
    <script src="./js/react-dom.development.js"></script>
    <script src="./js/babel.min.js"></script>

    <!-- 设置 type 为 text/babel 让里面的代码被babel转换 -->
    <script type="text/babel">
      const vDOM = (
        <div>
          <h1>Hello React</h1>
          <div className="box">
            <p>我的天，洗脚真爽。</p>
            <button className="btn">那确实</button>
          </div>
        </div>
      );

      const root = ReactDOM.createRoot(document.querySelector("#root"));
      root.render(vDOM);
    </script>
  </body>
</html>
